﻿using JTTD.Common.Enum;
using JTTD.Common.Helper;
using JTTD.Domain.Dtos;
using JTTD.Domain.Dtos.System.Request;
using JTTD.Domain.Dtos.System.Response;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace JTTD.Domain.IService
{
    /// <summary>
    /// 系统配置服务
    /// </summary>
    public  interface IConfigService : IDependency
    { 
        /// <summary>
        /// 设置配置
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> SetConfig(SetConfigRequestDto dto);

        /// <summary>
        /// 获取所有配置
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<List<ConfigInfoResponseDto>>> GetCofigInfoList();

        /// <summary>
        /// 获取指定配置
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        Task<ApiResult<ConfigInfoResponseDto>> GetConfig(ConfigTypeEnum key);

        /// <summary>
        /// 根据用户角色获取导航菜单
        /// </summary>
        /// <param name="userType"></param>
        /// <returns></returns>
        Task<ApiResult<List<LoadXmlResult<MenuInfoResponseDto>>>> GetMenuList(UserTypeEnum userType);
    }
}
